/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 iterator_operations.h

	$Header: /heroes4/iterator_operations.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ITERATOR_OPERATIONS_H_INCLUDED )
#define ITERATOR_OPERATIONS_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// -----------------------------------------------------------------------
// next_iterator() function template.  Returns the next iterator in the
// sequence without modifying its argument, unlike operator++().
// -----------------------------------------------------------------------
template < typename t_forward_iter >
inline t_forward_iter next_iterator( t_forward_iter arg )
{
	return ++arg;
}

// -----------------------------------------------------------------------
// prior_iterator() function template.  Returns the prior iterator in the
// sequence without modifying its argument, unlike operator--().
// -----------------------------------------------------------------------
template < typename t_bidirectional_iter >
inline t_bidirectional_iter prior_iterator( t_bidirectional_iter arg )
{
	return --arg;
}

#endif // !defined( ITERATOR_OPERATIONS_H_INCLUDED )
